<?php

class LoginAction extends BaseAction {
	public function index(){
		$this->display();
	}

	public function checkLogin() {
		if($_POST['username'] == "Admin" && $_POST['password'] =="1qaz2wsx=") {
			$_SESSION[self::GLOBAL_SESSION_USER_KEY] = "Admin";
			$this->redirect("Index/");
		}else{
			$this->error('用户名或密码错误！');
		}
	}

	public function logout(){
		$_SESSION[self::GLOBAL_SESSION_USER_KEY] = null;
		$this->redirect("Login/");
	}

	public function verify()
	{
		import("@.ORG.Image");
		Image::buildImageVerify();
	}

}
?>